package v1

import "github.com/gogf/gf/v2/frame/g"

// HasToHasReq 此处为1对1查询
type HasToHasReq struct {
	g.Meta `path:"/hasToHas" tags:"关系查询" method:"get" summary:"一对一查询"`
}
type HasToHasRes struct {
	Content *HasToHas `json:"content"`
}

type HasToHas struct {
	g.Meta      `orm:"table:boyfriend"`
	BoyfriendId uint64      `json:"boyfriendId" dc:"男朋友表中主键id"`
	Name        string      `json:"name"        dc:"男朋友名字"`
	Age         int         `json:"age"         dc:"年龄"`
	Girlfriend  *Girlfriend `json:"girlfriend" orm:"with:girlfriend_id=boyfriend_id"`
}

type Girlfriend struct {
	g.Meta       `orm:"table:girlfriend"`
	Id           uint64 `json:"id"          dc:"女朋友表中主键id"`
	Name         string `json:"name"        dc:"女朋友名字"`
	Age          int    `json:"age"         dc:"年龄"`
	GirlfriendId uint64 `json:"girlfriendId" dc:"关联男朋友表"`
}
